package com.example.concurrent.LinkedBlockingQueue;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * Created by Administrator on 2017/2/10 0010.
 */
public class LinkedBlockingQueueDemo {
    public static void main(String[] args) {

        try {
            BlockingQueue<String> bounded = new LinkedBlockingQueue<String>(1024);
            BlockingQueue<String> unbounded = new LinkedBlockingQueue<String>();
            bounded.put("Value");
            String value = bounded.take();
            System.out.println(value);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }

}
